package com.shop.cereshop.app.dl.logic.controller;

import com.shop.cereshop.app.dl.logic.service.CareShopNewsService;
import com.shop.cereshop.app.dl.logic.service.CereShopCarouselService;
import com.shop.cereshop.app.dl.logic.utils.ResultInfo;
import com.shop.cereshop.app.dl.logic.vo.Statistics;
import com.shop.cereshop.app.page.product.BuyerComment;
import com.shop.cereshop.app.service.buyer.CereBuyerUserService;
import com.shop.cereshop.app.service.shop.CereShopCommentService;
import com.shop.cereshop.commons.domain.buyer.CereBuyerUser;
import com.shop.cereshop.commons.utils.EmptyUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @program: dlshop
 * 描述：
 * @author: 我好帅
 * @create: 2021-06-15 15:40
 **/
@RestController
@RequestMapping("/api")
@CrossOrigin
public class CareShopNewsController {
    @Autowired
    private CareShopNewsService careShopNewsService;
    @Autowired
    private CereShopCarouselService cereShopCarouselService;
    @Autowired
    private CereBuyerUserService cereBuyerUserService;


    //周边景区推荐
    @PostMapping("/getScenicRecommend")
    public ResultInfo getScenicRecommend(@RequestParam(value = "page", defaultValue = "1") Integer page, @RequestParam(value = "row", defaultValue = "10") Integer row, Integer columnId, String content) {
        return careShopNewsService.selectByColumn(page, row, columnId, content);
    }

    //获取轮播图
    @PostMapping("/getCarousel")
    public ResultInfo getCarousel() {
        return cereShopCarouselService.getCarousel();
    }

}